﻿@using KC.Web.Admin.Constants
@model KC.DTO.Admin.ServiceBusPoolDTO
@{
    Layout = null;
}

@using (Html.BeginForm(ActionName.ServiceBusPool.SaveserviceBusPoolForm, ControllerName.ServiceBusPool, FormMethod.Post, new { id = "saveform", @class = "easyui-form" }))
{
    @Html.AntiForgeryToken()
    @Html.HiddenFor(model => model.ServiceBusPoolId)
    @Html.HiddenFor(model => model.TenantCount)
    @Html.HiddenFor(model => model.CanEdit)
    @Html.HiddenFor(model => model.IsDeleted)
    @Html.HiddenFor(model => model.CreatedBy)
    @Html.HiddenFor(model => model.CreatedDate)
    @Html.HiddenFor(model => model.ModifiedBy)
    @Html.HiddenFor(model => model.ModifiedDate)
    <table class="dialog-form-table">
        <tbody>
            <tr>
                <td><label class="required">*</label><label for="CloudType">云服务：</label></td>
                <td>@Html.DropDownListFor(c => c.CloudType, null, new { @id = "CloudType", @class = "easyui-combobox", @style = "width: 200px;height:26px;" })</td>
            </tr>
            <tr>
                <td><label class="required">*</label><label for="DistributedMessageType">类型:</label></td>
                <td>
                    @Html.DropDownListFor(c => c.DistributedMessageType, null, new { @id = "DistributedMessageType", @class = "easyui-combobox", @style = "width: 200px;height:26px;" })
                </td>
            </tr>
            <tr>
                <td><label class="required">*</label><label for="Endpoint">访问地址：</label></td>
                <td><input id="Endpoint" name="Endpoint" class="easyui-validatebox textbox" data-options="required:true,width:200,validType:'length[3,200]'" value="@Model.Endpoint" /></td>
            </tr>
            <tr>
                <td><label class="required">*</label><label for="AccessName">访问名称：</label></td>
                <td><input id="AccessName" name="AccessName" class="easyui-validatebox textbox" data-options="required:true,width:200,validType:'length[3,200]'" value="@Model.AccessName" /></td>
            </tr>
            <tr>
                <td><label class="required">*</label><label for="AccessKeyPassword">访问秘钥：</label></td>
                <td>
                    <input id="AccessKeyPassword" name="AccessKeyPassword" class="easyui-validatebox textbox" data-options="required:true,width:200,validType:'length[3,100]'" value="@(null != Model ? Model.AccessKeyPassword : "")" />
                </td>
            </tr>
            <tr>
                <td><a id="btnGeneratePwd" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-remove" plain="true" onclick="generatePasswordHash()">生成加密秘钥</a></td>
                <td>
                    <textarea id="AccessKeyPasswordHash" name="AccessKeyPasswordHash" class="textarea" data-options="width:200,validType:'length[3,500]'" style="height: 60px;width: 195px;">@(null != Model ? Model.AccessKeyPasswordHash : "")</textarea>
                </td>
            </tr>
            @*<tr>
                    <td colspan="2"><a id="btnTestConnect" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-standard-package-link" plain="true" onclick="testConnection()">测试连接</a></td>
                </tr>*@
        </tbody>
    </table>
}
<script type="text/javascript">
    $("#DistributedMessageType").combobox({
        required: true,
        editable: false
    })
    $("#CloudType").combobox({
        required: true,
        editable: false
    })
</script>